This invention relates generally to computer graphics applications, and more particularly to the use of computers for performing various digital color processing operations.
The proper representation of a color image is a very complex and often difficult subject matter. Historically, various color processing and reproduction techniques have been developed and used in several somewhat related but largely independent industries, such as movie filming, television, photography, and printing. Each of the different industries deals with a different set of constraints and conditions relating to the physical devices or media used to capture or reproduce the color images, such as a TV camera, a color film, or a color printer. As a result, many different color spaces have been developed to model and describe the colors of images in different applications. Several of the color spaces are defined by widely accepted industrial standards, such as the CIEXYZ and CIELAB color spaces by the Commission Internationale de l""Eclairage (CIE). Many other color spaces, however, are ad hoc and/or proprietary models used by different companies and sometimes specific to a given product, such as a digital camera or a printer.
In response to the current chaotic situation in digital color representation caused by the existence of many color description schemes that are often incompatible, the International Color Consortium (xe2x80x9cICCxe2x80x9d) was established with the goal of providing an open, vendor-neutral, cross-platform color management system architecture. One of the main efforts of ICC is to provide a universal approach to enable a clear definition of all the variables involved in the handling of colors by a device. This approach is based on a working concept called a xe2x80x9cprofile connection space,xe2x80x9d wherein each device has a xe2x80x9ccolor profilexe2x80x9d that describes the color management parameters used by the device. The format of the color profiles is described in the ICC Specification ICC.1:1998-09. Such device profiles can be used to translate color data created or processed on one device into the native color space of another device. By embedding device profiles in color image data and performing color translations based on the profiles, color data can be transparently moved across devices and operating systems.
The use of device color profiles provides an effective means for tracking and ensuring that a color is correctly mapped from the input color space to the output color space. There is, however, a broad range of users who do not require the level of flexibility, quality and control offered by the ICC profile-based color management strategy. Many developers also find it difficult to provide support for the full ICC profile format. For instance, the processing power required to use the ICC profiles might not be readily available for certain portable devices such as digital cameras. There are also some xe2x80x9clegacyxe2x80x9d platforms for which it may be difficult or costly to port ICC support.
To address these concerns, two color spaces, sRGB and sRGB64, have been proposed for use as standard default color spaces to compliment the ICC color management strategy. The sRGB space is a perceptual-based color space that is aimed at providing good color image quality with minimum transmission and system overhead. The sRGB64 color space is a physical-based color space that is closely related to the sRGB space and is intended for more advanced users who require more processing quality than that available with the sRGB space.
At the same time, there are efforts to develop alternative color management schemes for profile-based color translation that use significantly simplified profile formats to reduce the amount of processing involved. For instance, the proposed ICC standard has provisions for a simplified version of the ICC profile format. Another proposed scheme uses what is called a xe2x80x9cSimple ICC JPEG2000 Tag,xe2x80x9d which has a format very similar to the simplified profile format of the ICC standard but with the data interpreted somewhat differently.
Even with the above-described proposed color management strategies intended to provide uniformity and compatibility in the representation of colors, cross-platform color data transfer is still far from being a simple matter. One issue facing developers of graphics software is how to properly handle the different input and output color data formats. For instance, on a platform that uses the SRGB color space and has no support for the ICC strategy, there is a need for a solution to properly convert input color data with embedded device profiles for color processing operations or to convert processed data for output to an output device without suffering undue degradation of visual image quality. One specific question in that context is how to extract information regarding the gamma values for the color spaces used by the input and output color devices, since such information is not explicitly provided in the device color profile.
In view of the foregoing, the present invention provides a system and method for processing color data for input and output, including converting input color data in various formats into a working color space, and converting processed color data into the color space of an output device. In the case that the input data includes a device profile and the desired working color space is an RGB space, gamma information of the input data is extracted from the profile. In a simplified extraction process, the gamma value may be extracted by combining one-dimensional LUTs in the profile in a gray-scale conversion to form a gray-scale representation. This simplified extraction process can be effectively used not only on a simplified profile, such as one of the simplified profile format of the proposed ICC standard or the format of the Simple ICC JPEG2000 Tag, but also on more complex profile formats such as the full profile format of the proposed ICC standard. A full extraction process is also provided to more fully utilize the conversion data in a more complex profile, such as one of the full profile format of the proposed ICC standard. In the full extraction process, gamma information may be derived from each of the front end, middle, and back end portions of the profile. The derived gamma information for the portions of the profile may then be combined to provide a final gamma table or value. The robustness of the gamma extraction may be improved by testing the monotonicity and continuity of the 1-D LUTs from which the gamma table is derived.